home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / muds / lpmud312.tar / lpmud312 / config.h < prev    next >
Text File  |  1992-02-10  |  8KB  |  279 lines

  1. /*
  2.  * Define this if you want the MUDWHO-service. You have to configure it
  3.  * in mudwho.h.
  4.  */
  5. /* #define MUDWHO */
  6.  
  7. /*
  8.  * Define this if you want to use the improved access restriction system.
  9.  * Look at the file ACCESS.ALLOW for information. It replaces the old
  10.  * ACCESS.DENY.
  11.  */
  12. #define ACCESS_RESTRICTED
  13.  
  14. /*
  15.  * Define the maximum size of log files (in bytes).
  16.  */
  17. #define MAX_LOG_SIZE        50000
  18. /*
  19.  * Max size of a file allowed to be read by 'read_file()'.
  20.  */
  21. #define READ_FILE_MAX_SIZE    50000
  22.  
  23. /* Version of the game in the form xx.xx.xx (leading zeroes) gc.
  24.  * Two digits will be appended, that is the patch level.
  25.  */
  26. #define GAME_VERSION "03.01."
  27.  
  28. /*
  29.  * If an object is left alone for a certain time, then the
  30.  * function clean_up will be called. This function can do anything,
  31.  * like destructing the object. If the function isn't defined by the
  32.  * object, then nothing will happen.
  33.  *
  34.  * This time should be substantially longer than the swapping time.
  35.  */
  36. #define TIME_TO_CLEAN_UP    7200
  37.  
  38. /*
  39.  * How long time until an unused object is swapped out.
  40.  * Machine with too many players and too little memory: 900 (15 minutes)
  41.  * Machine with few players and lot of memory: 10000
  42.  * Machine with infinite memory: 0 (never swap).
  43.  */
  44. #define TIME_TO_SWAP    900
  45.  
  46. /*
  47.  * How many seconds until an object is reset again.
  48.  * Set this value high if big system, otherwise low.
  49.  * No castles:     1800    (30 minutes)
  50.  * >100 castles:10000    (almost 3 hours).
  51.  */
  52. #define TIME_TO_RESET    3600    /* one hour */
  53.  
  54. /*
  55.  * How to extract an unsigned char from a char *.
  56.  * If your compiler has the type 'unsigned char', then the cast-version
  57.  * is best. If you do not know, use the simple version, and the game will
  58.  * immediately terminate with a message if bad.
  59. #define EXTRACT_UCHAR(p) (*p < 0 ? *p + 0x100 : *p)
  60.  */
  61. #define EXTRACT_UCHAR(p) (*(unsigned char *)p)
  62.  
  63. /*
  64.  * Define the maximum stack size of the stack machine. This stack will also
  65.  * contain all local variables and arguments.
  66.  */
  67. #define EVALUATOR_STACK_SIZE    1000
  68.  
  69. /*
  70.  * Define the maximum call depth for functions.
  71.  */
  72. #define MAX_TRACE        30
  73.  
  74. /*
  75.  * Define the size of the compiler stack. This defines how complex
  76.  * expressions the compiler can parse. The value should be big enough.
  77.  */
  78. #define COMPILER_STACK_SIZE    200
  79.  
  80. /*
  81.  * What is the value of the first constant defined by yacc ? If you do not
  82.  * know, compile, and look at y.tab.h.
  83.  */
  84. #define F_OFFSET        257
  85.  
  86. /*
  87.  * Does the system have a getrusage call?
  88.  */
  89. /* #define RUSAGE */
  90.  
  91. /*
  92.  * Maximum number of bits in a bit field. They are stored in printable
  93.  * strings, 6 bits per byte.
  94.  */
  95. #define MAX_BITS        1200    /* 200 bytes */
  96.  
  97. /*
  98.  * There is a hash table for living objects, used by find_living().
  99.  */
  100. #define LIVING_HASH_SIZE    100
  101.  
  102. /*
  103.  * Define what port number the game is to use.
  104.  */
  105. #define PORTNO            3000
  106.  
  107. /*
  108.  * This is the file which contains names of objects to be
  109.  * loaded initially. Do not normally change this.
  110.  */
  111. #define INIT_FILE        "room/init_file"
  112.  
  113. /*
  114.  * This is the subdirectory where all wizards objects are defined.
  115.  */
  116. #define PLAYER_DIR        "w"
  117.  
  118. /*
  119.  * If you want to put wizards in groups and give each group a subdirectory
  120.  * you should define this. Domain directorys must start witha capital
  121.  * letter, and wizards names must not.
  122.  */
  123. #define DOMAINS
  124.  
  125. /*
  126.  * This is the subdirectory where all the domain directorys are placed.
  127.  */
  128. #define DOMAIN_DIR              "d"
  129.  
  130. /*
  131.  * Undef this if your system doesn't support Berkley type symlinks.
  132.  */
  133. #define SYMLINKS
  134.  
  135. /*
  136.  * This is the castle that a wiz gets a copy of.
  137.  */
  138. #define DEFAULT_CASTLE        "d/Standard/start/def_castle.c"
  139.  
  140. /*
  141.  * This is the workroom that a wiz gets a copy of.
  142.  */
  143. #define DEFAULT_WORKROOM    "d/Standard/start/def_workroom.c"
  144.  
  145. /*
  146.  * This is the room where the new castle should reside. If it is not
  147.  * defined, then it will be put in the same room as the player.
  148.  */
  149. #define CASTLE_ROOM        "room/new_castles"
  150.  
  151. /*
  152.  * Max number of local variables in a function.
  153.  */
  154. #define MAX_LOCAL    20    
  155.  
  156. /*
  157.  * Define what ioctl to use against tty's.
  158.  */
  159.  
  160. #define USE_TIOCGETP        /* BSD */
  161. /* #define USE_TCGETA */     /* SYSV */
  162.  
  163. /* Maximum number of evaluated nodes/loop.
  164.  * If this is exceeded, current function is halted.
  165.  * The worst case yet encountered is 3600    (dec 1989)
  166.  */
  167. #define MAX_COST    100000
  168.  
  169. /*
  170.  * Where to swap out objects. This file is not used if NUM_RESET_TO_SWAP
  171.  * is 0.
  172.  */
  173. #define SWAP_FILE        "LP_SWAP.3"
  174.  
  175. /*
  176.  * This is the maximum array size allowed for one single array.
  177.  */
  178. #define MAX_ARRAY_SIZE 1000
  179.  
  180. /*
  181.  * Some LPmuds on sun4 and sparcstations have had problems with the
  182.  * call of inet_ntoa() in comm1.c.
  183.  * If the game crash in query_ip_number() wen using inet_ntoa(),
  184.  * then undefine the following symbol.
  185.  * The query_ip_number() is called when doing the 'people' command
  186.  * for example.
  187.  */
  188. /* #define INET_NTOA_OK */
  189.  
  190. /*
  191.  * Define LOG_SHOUT if you want all shouts to be logged in
  192.  * mudlib/log/SHOUTS.
  193.  */
  194. #define LOG_SHOUT
  195.  
  196. /*
  197.  * Maximum number of players in the game.
  198.  */
  199. #define MAX_PLAYERS    40
  200.  
  201. /*
  202.  * When uploading files, we want fast response; however, normal players
  203.  * shouldn't be able to hog the system in this way.  Define ALLOWED_ED_CMDS
  204.  * to be the ratio of the no of ed cmds executed per player cmd, and
  205.  * MAX_CMDS_PER_BEAT to be the bax no of buffered player commands the
  206.  * system will accept in each heartbeat interval.
  207.  */
  208.  
  209. #define    ALLOWED_ED_CMDS        20
  210. #define    MAX_CMDS_PER_BEAT    5 /* not implemented yet :-( */
  211.  
  212. /*
  213.  * Reserve an extra memory area from malloc(), to free when we run out
  214.  * of memory to get some warning and start Armageddon.
  215.  * If this value is 0, no area will be reserved.
  216.  */
  217. #define RESERVED_SIZE        800000
  218.  
  219. /* Define the size of the shared string hash table.  This number should
  220.  * a prime, probably between 1000 and 30000; if you set it to about 1/5
  221.  * of the number of distinct strings you have, you will get a hit ratio
  222.  * (number of comparisons to find a string) very close to 1, as found strings
  223.  * are automatically moved to the head of a hash chain.  You will never
  224.  * need more, and you will still get good results with a smaller table.
  225.  * THIS IS NOT IMPLEMENTED YET.
  226.  */
  227.  
  228. #define    HTABLE_SIZE    2203    /* there is a table of some primes too */
  229.  
  230. /*
  231.  * Object hash table size.
  232.  * Define this like you did with the strings; probably set to about 1/4 of
  233.  * the number of objects in a game, as the distribution of accesses to
  234.  * objects is somewhat more uniform than that of strings.
  235.  */
  236.  
  237. #define OTABLE_SIZE    1009    /* we have several thousand obs usually */
  238.  
  239. /*
  240.  * Define SYSV if you are running system V with a lower release level than
  241.  * Sys V.4.
  242.  */
  243.  
  244. #undef SYSV
  245.  
  246. /*
  247.  * Define FCHMOD_MISSING only if your system doesn't have fchmod().
  248.  */
  249.  
  250. #undef FCHMOD_MISSING
  251.  
  252. /*
  253.  * Define COMPAT_MODE if you are using mudlib 2.4.6 or older. This
  254.  * replaces the old command line option -o.
  255.  */
  256.  
  257. #undef COMPAT_MODE
  258.  
  259. /*
  260.  * Define MAX_BYTE_TRANSFER to the number of bytes you allow to be read
  261.  * and written with read_bytes and write_bytes
  262.  */
  263.  
  264. #define MAX_BYTE_TRANSFER 10000
  265.    
  266. /************************************************************************/
  267. /*    END OF CONFIG -- DO NOT ALTER ANYTHING BELOW THIS LINE        */
  268. /************************************************************************/
  269.  
  270. /*
  271.  * some generic large primes used by various hash functions in different files
  272.  * You can alter these if you know of a better set of numbers!  Be sure
  273.  * they are primes...
  274.  */
  275.  
  276. #define    P1        701    /* 3 large, different primes */
  277. #define    P2        14009    /* There's a file of them here somewhere :-) */
  278. #define    P3        54001
  279.